<template>
	<view>
		<image :src="src" mode="widthFix" class="u-m-l-28" style="width: 40rpx;height: auto;">
		</image>
	</view>
		
</template>

<script setup>
	import {
		computed
	} from 'vue'
	
	const props = defineProps({
		weather: String,
	})
	
	const src = computed(()=>{
		if(props.weather.indexOf('晴') > -1){
			return '/static/wearther/qing.png'
		}
		if(props.weather.indexOf('多云') > -1){
			return '/static/wearther/duoyun.png'
		}
		if(props.weather.indexOf('雨') > -1){
			return '/static/wearther/yu.png'
		}
		if(props.weather.indexOf('雨') > -1){
			return '/static/wearther/yu.png'
		}
		if(props.weather.indexOf('雪') > -1){
			return '/static/wearther/xue.png'
		}
		return '/static/wearther/qing.png'
	})
	
</script>

<style lang="scss">

</style>